<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>启动页</title>
	<script type="text/javascript" src="<%= application.getContextPath() %>/style/js/jquery-1.8.3.js"></script>
	<script type="text/javascript">
		
		$(function(){
			
			$("#start").click(function(){
				
				$.post("charge/start.action");
				$(this).attr("disabled","disabled");
				$("#stop").removeAttr("disabled");
				$("#startsearch").attr("disabled","disabled");
			});
			
			$("#startsearch").click(function(){
				
				$.post("charge/startSearch.action");
				$(this).attr("disabled","disabled");
				$("#start").attr("disabled","disabled");
			});
			
			
			$("#stop").click(function(){
				
				$.get("charge/stop.action");
				$(this).attr("disabled","disabled");
				$("#start").removeAttr("disabled");
				$("#startsearch").removeAttr("disabled");
			});
			
			$("#balance").click(function(){
				
				$.get("charge/balance.action", function(data){
					$("#balancetips").html("当前余额为："+data);
				});
			});
		});
		
	</script>
</head>
<body>
		<input id="start" type="button" value="启动程序"/>
		<input id="stop" type="button" value="停止程序"/>
		<input id="startsearch" type="button" value="只启动查询"/>
		
		
		<input id="balance" type="button"  value="查询余额" />
		<span id="balancetips"></span>
		<br/>
</body>
</html>
